<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<style>
<!--
.advice_info {
	widht: 100%;
	min-height: 30px;
	margin-top: 5px;
}

.advice_info>.advice_head {
	height: 38px;
	line-height: 38px;
	padding-left: 7px;
	padding-right: 7px;
	border: 1px solid #DBDBDB;
	background: url('catalog/view/theme/mobile/image/box.png') repeat-x;
	-webkit-border-radius: 7px 7px 0px 0px;
	-moz-border-radius: 7px 7px 0px 0px;
	-khtml-border-radius: 7px 7px 0px 0px;
	border-radius: 7px 7px 0px 0px;
}

.advice_info>.advice_content {
	padding: 10px;
	border-left: 1px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	min-height: 80px;
	overflow: auto;
}
-->
</style>
<script type="text/javascript">
<!--
function deleteUploadInfo(href){
	$('#deleteForm').attr('action',href);
	$('#deleteForm').submit();
}

$(document).ready(function(){
 	$('#viewButton').bind('click',function(){
		$('#fileField').click();
 	});

 
});

function altRows(id){
	if(document.getElementsByTagName){  
		var table = document.getElementById(id);  
		var rows = table.getElementsByTagName("tr"); 
		for(i = 0; i < rows.length; i++){          
			if(i % 2 == 0){
				rows[i].className = "evenrowcolor";
			}else{
				rows[i].className = "oddrowcolor";
			}      
		}
	}
}

window.onload=function(){
	altRows('alternatecolor');
}

function check(){
	var nameValue = $('#name').val();
	 	var textfieldValue = $('#textfield').val();
	 	
	if(nameValue!=null&&nameValue!=''){
	}else{
		alert('请先选择文件名');
		return false;
	}

	if(textfieldValue!=null&&textfieldValue!=''){
	}else{
		alert('请先选择文件');
		return false;
	}
}
//-->
</script>
<style>
input {
	vertical-align: middle;
	margin: 0;
	padding: 0
}

.file-box {
	position: relative;
	width: 100%;
}

.txt {
	height: 100px;
	border: 1px solid #cdcdcd;
	width: 40%;
	line-height: 20px;
}

.btn {
	background-color: #FFF;
	border: 1px solid #CDCDCD;
	height: 24px;
	width: 70px;
}

.file {
	position: absolute;
	top: 90px;
	right: 30.50%;
	height: 100px;
	filter: alpha(opacity :     0);
	opacity: 0;
	width: 0px;
}

#textfield {
	height: 20px;
}

.upload_info {
	font-size: 20px;
	font-weight: bold;
	border: 0px !important;
	background-color: #36a6f0;
	color: #ffffff;
}

.upload_info_table tr>td {
	border-bottom: 1px solid #AAA;
}

tr {
	display: table-row;
	vertical-align: inherit;
	border-bottom: 1px dashed #aaa;
	border-color: inherit;
}

table.imagetable {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #999999;
	border-collapse: collapse;
}
table.imagetable th {
	background:#b5cfd2 url('catalog/view/theme/default/image/cell-blue.jpg');
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #999999;
}

.oddrowcolor{
	background-color:#d4e3e5;
}
.evenrowcolor{
	background-color:#c3dde0;
}

</style>
<div class="box">
	<div id="content">
	<?php echo $content_top; ?>
	<h2 style="text-align: center;width:100%"><?php echo $type_name;?></h2>
		<div class="advice_info">
			<div class="advice_head">
				<h2>附件上传</h2>
			</div>
			<div class="advice_content">
				<div style="background-color: #ecf9ff">
					<div class="file-box">
						<form action="<?php echo $insert;?>" method="post" id="upForm"
							enctype="multipart/form-data">
							<table style="width: 100%" class="form">
								<tbody>
									<tr>
										<td>预约要求<span style="color: red">*</span></td>
										<td><?php echo $description;?></td>
									</tr>

									<tr>
										<td>身份证号：<span style="color: red">*</span></td>
										<td><input type="text" name="card_no"
											value="<?php echo $card_no;?>" readonly="readonly" /><input
											type="hidden" name="order_id" value="<?php echo $order_id;?>" />
										</td>
									</tr>
									<tr>
										<td>预约类型<span style="color: red">*</span></td>
										<td><select name="bussness_type_id">
												<option value="-1">请选择....</option>
												<?php foreach ($bussnesss as $bussness) { ?>
												<option value="<?php echo $bussness['bussness_type_id']?>"
												<?php if($bussness_type_id==$bussness['bussness_type_id']){?>
													selected="selected" <?php }?>>
													<?php echo $bussness['type_name'];?>
												</option>
												<?php }?>
										</select></td>
									</tr>
									<tr>
										<td>文件名：<span style="color: red">*</span></td>
										<td><select id="name" name="name">
												<option value="">请选择......</option>
												<option value="夫妻双方的户口本">夫妻双方的户口本</option>
												<option value="身份证">身份证</option>
												<option value="结婚证">结婚证</option>
												<option value="房屋产权证">房屋产权证</option>
												<option value="户口本">户口本</option>
												<option value="双方的关系证明">双方的关系证明</option>
												<option value="产权人签字同意">产权人签字同意</option>
												<option value="双方户口本">双方户口本</option>
										</select> <!-- 
							<input type="text" name="name" id="name" /><span>请填写</span></td>
							 -->
									
									</tr>
									<tr>
										<td>文件上传</td>
										<td><input type='text' name='textfield' id='textfield'
											class='txt' readonly="readonly" /> <input type="file"
											name="fileField" class="file" id="fileField" size="28"
											onchange="document.getElementById('textfield').value=this.value" />
										</td>
									</tr>
									<tr>
										<td colspan="2" style="padding-left: 80px;"><input
											type='button' class='btn' style="height: 35px; width: 30%;"
											value='浏览...' id="viewButton" /> <input type="submit"
											name="submit" class="btn" id="shangchuan"
											style="height: 35px; width: 30%;" value="上传"
											onclick="return check()" /></td>
									</tr>

								</tbody>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>

		<div class="advice_info">
			<div class="advice_head">
				<h2>预审核意见</h2>
			</div>
			<div class="advice_content">
			<table>
				<tr>
					<td><label>预审核意见：<br/><span style="color:#aaa;font-size: 10px;display:inline-block; width:150px;">我所会在第一时间预审核预约信息,并给出审核结果</span></label></td>
					<td><font color="red"><?php if($summary){echo $summary;}else{ echo "暂未审核";};?> </font></td>
				</tr>
			</table>
			</div>
		</div>

		<div class="advice_info">
			<div class="advice_head">
				<h2>附件列表</h2>
			</div>
			<div class="advice_content">
				<table class="upload_info_table imagetable" id="alternatecolor" style="width: 100%">
					<thead>
						<tr>
							<th>缩略图</th>
							<th style="text-align: center;">名称</th>
							<th>操作</th>
						</tr>
					</thead>
					<?php if(isset($uploadInfos)){?>
					<?php foreach ($uploadInfos as $uploadInfo) { ?>
					<tr>
						<td><img src="<?php echo $uploadInfo['download'];?>" width="50px"
							height="50px" />
						</td>
						<td width="60%" style="text-align: center;"><a href="<?php echo  $uploadInfo['download'];?>"><?php echo $uploadInfo['name'];?>
						</a>
						</td>
						<td width="20%"><a class="button deleteButton"
							onclick="deleteUploadInfo('<?php echo  $uploadInfo['href']; ?>')">删除</a>
						</td>
					</tr>
					<?php }?>
					<?php }?>
				</table>

				<form action="" method="post" id="deleteForm"
					enctype="multipart/form-data"></form>

			</div>
		</div>
		<?php echo $content_bottom; ?>
	</div>

	<?php echo $footer;?>